package cn.sirun.com.fca.account.model.login;

import com.tencent.cloud.iov.util.ObjectUtils;

import cn.sirun.com.fca.account.model.profile.Reseller;

/**
 * @author vinsonhuang
 * @date 2018/9/18
 */
public class PersonalInfo {

    private String iconUrl;

    private String nick;

    private String emergencyContactPerson;

    private String emergencyContactNumber;

    private String userPhone;

    private String userNation;

    private String score;

    private boolean wxBind;

    private boolean qqBind;

    private String email;

    /**
     * 头像文件名称 缓存key
     */
    private String headPortraitFileNameCacheKey;

    private String iovCurrentVehicle;

    private boolean idNumExist;

    private Reseller reseller;

    public PersonalInfo() {
    }

    public PersonalInfo(String iconUrl, String nick, String emergencyContactPerson,
                        String emergencyContactNumber, String userPhone, String userNation,
                        String score, boolean wxBind, boolean qqBind, String email, String iovCurrentVehicle
            , boolean idNumExist) {
        this.iconUrl = iconUrl;
        this.nick = nick;
        this.emergencyContactPerson = emergencyContactPerson;
        this.emergencyContactNumber = emergencyContactNumber;
        this.userPhone = userPhone;
        this.userNation = userNation;
        this.score = score;
        this.wxBind = wxBind;
        this.qqBind = qqBind;
        this.email = email;
        this.iovCurrentVehicle = iovCurrentVehicle;
        this.idNumExist = idNumExist;
    }


    public String getIovCurrentVehicle() {
        return iovCurrentVehicle;
    }

    public void setIovCurrentVehicle(String iovCurrentVehicle) {
        this.iovCurrentVehicle = iovCurrentVehicle;
    }

    public String getIconUrl() {
        return iconUrl;
    }

    public void setIconUrl(String iconUrl) {
        this.iconUrl = iconUrl;
    }

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    public String getEmergencyContactPerson() {
        return emergencyContactPerson;
    }

    public void setEmergencyContactPerson(String emergencyContactPerson) {
        this.emergencyContactPerson = emergencyContactPerson;
    }

    public String getEmergencyContactNumber() {
        return emergencyContactNumber;
    }

    public void setEmergencyContactNumber(String emergencyContactNumber) {
        this.emergencyContactNumber = emergencyContactNumber;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getUserNation() {
        return userNation;
    }

    public void setUserNation(String userNation) {
        this.userNation = userNation;
    }

    public String getScore() {
        return score;
    }

    public void setScore(String score) {
        this.score = score;
    }

    public boolean isWxBind() {
        return wxBind;
    }

    public void setWxBind(boolean wxBind) {
        this.wxBind = wxBind;
    }

    public boolean isQqBind() {
        return qqBind;
    }

    public void setQqBind(boolean qqBind) {
        this.qqBind = qqBind;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getHeadPortraitFileNameCacheKey() {
        return headPortraitFileNameCacheKey;
    }

    public void setHeadPortraitFileNameCacheKey(String headPortraitFileNameCacheKey) {
        this.headPortraitFileNameCacheKey = headPortraitFileNameCacheKey;
    }

    public boolean isIdNumExist() {
        return idNumExist;
    }

    public void setIdNumExist(boolean idNumExist) {
        this.idNumExist = idNumExist;
    }

    public Reseller getReseller() {
        return reseller;
    }

    public void setReseller(Reseller reseller) {
        this.reseller = reseller;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PersonalInfo that = (PersonalInfo) o;
        return wxBind == that.wxBind &&
                qqBind == that.qqBind &&
                ObjectUtils.equals(iconUrl, that.iconUrl) &&
                ObjectUtils.equals(nick, that.nick) &&
                ObjectUtils.equals(emergencyContactPerson, that.emergencyContactPerson) &&
                ObjectUtils.equals(emergencyContactNumber, that.emergencyContactNumber) &&
                ObjectUtils.equals(userPhone, that.userPhone) &&
                ObjectUtils.equals(userNation, that.userNation) &&
                ObjectUtils.equals(score, that.score) &&
                ObjectUtils.equals(headPortraitFileNameCacheKey, that.headPortraitFileNameCacheKey);
    }

    @Override
    public int hashCode() {
        return ObjectUtils.hash(iconUrl, nick, emergencyContactPerson, emergencyContactNumber,
                userPhone, userNation, score, wxBind, qqBind, headPortraitFileNameCacheKey);
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("PersonalInfo{");
        sb.append("iconUrl='").append(iconUrl).append('\'');
        sb.append(", nick='").append(nick).append('\'');
        sb.append(", emergencyContactPerson='").append(emergencyContactPerson).append('\'');
        sb.append(", emergencyContactNumber='").append(emergencyContactNumber).append('\'');
        sb.append(", userPhone='").append(userPhone).append('\'');
        sb.append(", userNation='").append(userNation).append('\'');
        sb.append(", score='").append(score).append('\'');
        sb.append(", wxBind=").append(wxBind);
        sb.append(", qqBind=").append(qqBind);
        sb.append('}');
        return sb.toString();
    }
}
